fix(hosting): export BYO_BRAND so the public ByoValue type resolves - #3336
Closed
sharonyajain wants to merge 1 commit into
Closed
sharonyajain wants to merge 1 commit into
sharonyajain wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 515323a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
sharonyajain
force-pushed
the
fix/hosting-export-byo-brand
branch
from
September 9, 2026 12:27
077cd3f to
fee922d
Compare
…pe resolves ByoValue was branded with a unique-symbol computed key (BYO_BRAND). The exported type referenced that symbol, but api-extractor omits the Symbol.for() const from the generated API report, leaving API.md self-inconsistent: check_api_changes compiles the report and fails with TS2304 'Cannot find name BYO_BRAND'. This is red on main and blocks every PR built on it. Replace the symbol brand with a literal-typed readonly __byoBrand: true discriminant, which is fully representable in the report. Runtime behavior of byoSecret/byoConfig/isByoValue is unchanged; hosting secret_config tests 6/6 pass.
sharonyajain
force-pushed
the
fix/hosting-export-byo-brand
branch
from
September 9, 2026 12:40
fee922d to
515323a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
check_api_changesis currently failing onmain(and therefore on every PR built on it) with a TypeScript compile error in@aws-amplify/hosting:@aws-amplify/hostingexports theByoValuetype, whose shape is{ readonly [BYO_BRAND]: true; ... }. ButBYO_BRANDis a module-privateconstinpackages/hosting/src/byo.ts(const BYO_BRAND = Symbol.for(...), not exported). Whencheck_api_changescompiles the public API surface, the exportedByoValuereferences a name that isn't exported alongside it, so the compile fails. This blocks the check onmainand on every open PR that includes the hosting package (e.g. #3326, #3329).Issue number, if available: N/A (CI/tooling fix;
mainis red oncheck_api_changesafter the standalone-SSR-hosting change)Changes
packages/hosting/src/byo.ts:exporttheBYO_BRANDsymbol so the exportedByoValuetype's shape is fully resolvable during API extraction. Runtime behavior is unchanged — it remains the sameSymbol.for('@aws-amplify/hosting.byo')registry symbol (the comment already notesSymbol.foris chosen so it survives across module copies).@aws-amplify/hosting.No
API.mdchange: api-extractor renders the[BYO_BRAND]computed key inByoValuethe same way whether or not the symbol is exported, so exporting it resolves the compile error with zero change to the emitted public-API surface (verified by regeneratingpackages/hosting/API.mdlocally — no diff).Corresponding docs PR, if applicable: N/A
Validation
@aws-amplify/hostinglocally with@aws-blocks/hostinginstalled:tsc --build packages/hostingexits 0 (previously failed on theBYO_BRANDreference). The emittedpackages/hosting/lib/byo.d.tsnow containsexport declare const BYO_BRAND: unique symbol;, so the exportedByoValuetype resolves.packages/hosting/API.mdviaapi-extractor run --local: no change (confirms zero public-API-surface delta).check_api_changesCI step is the exercising path.Checklist
run-e2elabel set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
no linked-issue close: CI/tooling fix unblocking
check_api_changesonmain; not tied to a tracked issue.